package Extends.ExtendsText004;

/**
 * ClassName:Student
 * Package:Extends.ExtendsText004
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/20-2:20
 * @Version:v1.0
 */
public class Student {
    String name;
    int age;
    String school;
    //需求：
    //默认为传智大学

    public Student() {
        //表示调用本类其他构造方法
        //虚拟机就不会添加super();
        //this访问本类的构造方法
        this(null,0,"传智大学");
    }

    public Student(String name, int age, String school) {
        this.name = name;
        this.age = age;
        this.school = school;
    }
}
